function textvalue(idselect,index)
{
    document.getElementById(idselect).value=index;
}

function optionvalue(idselect,value)
{
    l=document.getElementById(idselect).options.length;
    for(i=0; i<l; i++)
    {
        if(document.getElementById(idselect).options[i].value == value)
        {
            document.getElementById(idselect).options[i].selected = true;
            break;
        }
    }
}